package testing;

import java.util.ArrayList;
import java.util.Arrays;

import org.junit.Test;

import acm.*;
import complementos.Exon;
import static org.junit.Assert.*;

public class JunitDNA {

	@Test
	public void probarArmado() {
		
		System.out.println("Prueba junit Exon");
		
		DNA d = new DNA();
		
		ArrayList<Exon> listaPrueba1 = new ArrayList<Exon>(){{
			add(new Exon(340, 500 , 1));
			add(new Exon(220, 470 , 2));
			add(new Exon(100, 300 , 3));
			add(new Exon(880, 943 , 4));
			add(new Exon(525, 556 , 5));
			add(new Exon(612, 776 , 6));
		}};

		ArrayList<Exon> listaPrueba2 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
		}};
		
		ArrayList<Exon> listaPrueba3 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
		}};
		
		ArrayList<Exon> listaPrueba4 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
			add(new Exon(220, 470 , 4));
		}};
		
		ArrayList<Exon> listaPrueba5 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(100, 300 , 3));
			add(new Exon(453, 665 , 4));
		}};
		
		ArrayList<Exon> listaPrueba6 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
			add(new Exon(880, 943 , 4));
		}};
		
		ArrayList<Exon> listaPrueba7 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
			add(new Exon(525, 556 , 4));
		}};
		
		ArrayList<Exon> listaPrueba8 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
			add(new Exon(612, 776 , 4));
		}};
		
		ArrayList<Exon> listaPrueba9 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
			add(new Exon(50, 100 , 4));
		}};
		
		ArrayList<Exon> listaPrueba10 = new ArrayList<Exon>(){{
			add(new Exon(705, 773 , 1));
			add(new Exon(124, 337 , 2));
			add(new Exon(453, 665 , 3));
			add(new Exon(800, 876 , 4));
		}};
		
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba1) , new int[]{3,1,5,6,4} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba2) , new int[]{2,3,1} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba3) , new int[]{2,3,1} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba4) , new int[]{2,3,1} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba5) , new int[]{3,4,1} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba6) , new int[]{2,3,1,4} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba7) , new int[]{2,3,1} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba8) , new int[]{2,3,1} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba9) , new int[]{4,2,3,1} ));
		assertTrue( Arrays.equals( d.armarSecuencia(listaPrueba10) , new int[]{2,3,1,4} ));
		
		
		
	}
}
